﻿<Window x:Class="GEPL.Views.TurtleProjectSettings"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:p="clr-namespace:GEPL.Properties"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
        xmlns:converters="clr-namespace:GEPL.Converters"
        xmlns:viewModels="clr-namespace:GEPL.ViewModels"
        Title="{x:Static p:Resources.TurtleProject_Create}"
        Height="Auto"
        Width="Auto"
        WindowStyle="ToolWindow"
        WindowStartupLocation="CenterOwner"
        ResizeMode="NoResize"
        SizeToContent="WidthAndHeight"
        ShowInTaskbar="False">
    <Window.DataContext>
        <viewModels:TurtleProjectSettingsModel />
    </Window.DataContext>
    <Window.Resources>
        <converters:GdiColorToMediaColorConverter x:Key="GdiColorToMediaColorConverter" />
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Label Content="{x:Static p:Resources.TurtleProject_PenColor}"
               Grid.Column="0"
               Grid.Row="0" />
        <Label Content="{x:Static p:Resources.TurtleProject_BackgroundColor}"
               Grid.Column="0"
               Grid.Row="1" />
        <Label Content="{x:Static p:Resources.TurtleProject_Width}"
               Grid.Column="0"
               Grid.Row="2" />
        <Label Content="{x:Static p:Resources.TurtleProject_Height}"
               Grid.Column="0"
               Grid.Row="3" />
        <xctk:ColorPicker Grid.Column="1"
                          Grid.Row="0"
                          SelectedColor="{Binding PenColor, Mode=TwoWay, Converter={StaticResource GdiColorToMediaColorConverter}}" />
        <xctk:ColorPicker Grid.Column="1"
                          Grid.Row="1"
                          SelectedColor="{Binding BgColor, Mode=TwoWay, Converter={StaticResource GdiColorToMediaColorConverter}}" />
        <xctk:IntegerUpDown Grid.Column="1"
                            Grid.Row="2"
                            Value="{Binding Width, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        <xctk:IntegerUpDown Grid.Column="1"
                            Grid.Row="3"
                            Value="{Binding Height, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        <Button Grid.Column="0"
                Grid.Row="4"
                Content="{x:Static p:Resources.Common_Ok}"
                Click="Button_Click"
                Command="{Binding OkCommand}" />
        <Button Grid.Column="1"
                Grid.Row="4"
                Content="{x:Static p:Resources.Common_Cancel}"
                IsCancel="True" />
    </Grid>
</Window>